using System;
using System.Collections.Generic;
using System.Collections;
using System.Text;
using System.IO;

namespace Stopwatch
{
    public class DateComparerDes : IComparer
    {
        public int Compare(object fileInfo1, object fileInfo2)
        {
            DateTime CreationTime1 = ((FileInfo)fileInfo1).CreationTime;
            DateTime CreationTime2 = ((FileInfo)fileInfo2).CreationTime;

            return DateTime.Compare(CreationTime2, CreationTime1);
        }
    }

    public class DateComparerAsc : IComparer
    {
        public int Compare(object fileInfo1, object fileInfo2)
        {
            DateTime CreationTime1 = ((FileInfo)fileInfo1).CreationTime;
            DateTime CreationTime2 = ((FileInfo)fileInfo2).CreationTime;

            return DateTime.Compare(CreationTime1, CreationTime2);
        }
    }

}
